Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix one-page example rendering #1337

Merged
merged 3 commits into from
Aug 15, 2024

Conversation

kangju2000
Copy link
Contributor

Description

Resolve issue where the one-page example does not render.

The version of react-dom was set to >=18.0.0, causing a conflict between the latest version 18.3.1 and react 18.2.0. This is resolved by locking react-dom to version 18.2.0.

👇 Screenshot when entering one-page

image

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Checklist: (Feel free to delete this section upon completion)

  • I have included a changeset if this change will require a version change to one of the packages.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have run pnpm run check:ci and all checks pass
  • I have added tests that prove my fix is effective or that my feature works
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

Copy link

changeset-bot bot commented Aug 3, 2024

⚠️ No Changeset found

Latest commit: ea1a25f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Aug 3, 2024

@kangju2000 is attempting to deploy a commit to the formidable-labs Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Aug 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
spectacle-docs-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 3, 2024 9:50pm

Copy link
Member

@ryan-roemer ryan-roemer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and tried locally. Thanks!

@carbonrobot you want to merge this or me?

@ryan-roemer
Copy link
Member

ryan-roemer commented Aug 6, 2024

@kangju2000 -- index.html is generated and off of real dependencies. Can you add this to your PR, which should fix CI and then test index.html that it works for you? Thanks!

index a4e2c28..d6d7b0f 100644
--- a/examples/one-page/scripts/one-page.js
+++ b/examples/one-page/scripts/one-page.js
@@ -40,8 +40,8 @@ const USE_LOCAL = false;
 // Import Map
 // ================================================================================================
 const importUrl = (k, v, extra = '') => {
-  // Pin react.
-  if (k === 'react') {
+  // Pin react and react-dom
+  if (k === 'react' || k === 'react-dom') {
     v = reactVersion;
   }
 

@kangju2000
Copy link
Contributor Author

@ryan-roemer
Ah, I see! The index.html is generated by a script. I've committed the changes :) 197f711

@carbonrobot carbonrobot merged commit 47d0101 into FormidableLabs:main Aug 15, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants